//package com.hzncc.scaffold.controller.other;
//
//
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.hzncc.scaffold.mapper.ApplianceapplyMapper;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import java.util.List;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.hzncc.scaffold.core.ResultT;
//import com.hzncc.scaffold.service.ApplianceapplyService;
//import com.hzncc.scaffold.entity.Other.Applianceapply;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * <p>
// * 机构申请表 前端控制器
// * </p>
// *
// * @author DrunkBear
// * @since 2022-04-27
// */
//@RestController
//@RequestMapping("/applianceapply")
//public class ApplianceapplyController {
//
//    @Resource
//    private ApplianceapplyService applianceapplyService;
//
//    @Autowired
//    ApplianceapplyMapper applianceapplyMapper;
//
//    /**
//     * 查询表中所有信息
//     *
//     * @return
//     */
//    @GetMapping
//    public ResultT findAll() {
//        return ResultT.success(applianceapplyService.list());
//    }
//
//    /**
//     * 根据Id查询表中数据
//     *
//     * @param id
//     * @return
//     */
//    @GetMapping("/{id}")
//    public ResultT findOne(@PathVariable Integer id) {
//        return ResultT.success(applianceapplyService.getById(id));
//    }
//
//    /**
//     * 分页查询
//     *
//     * @param pageNum
//     * @param pageSize
//     * @return
//     */
//    @GetMapping("/page")
//    public ResultT findPage(@RequestParam Integer pageNum, @RequestParam Integer pageSize) {
//        QueryWrapper<Applianceapply> queryWrapper = new QueryWrapper<>();
//        return ResultT.success(applianceapplyService.page(new Page<>(pageNum, pageSize), queryWrapper));
//    }
//
//    /**
//     * 新增和更新接口
//     *
//     * @param
//     * @return
//     */
//    @PostMapping
//    public ResultT save(@RequestBody Applianceapply applianceapply) {
//        applianceapplyService.saveOrUpdate(applianceapply);
//        return ResultT.success();
//    }
//
//    /**
//     * 根据Id删除表中数据
//     *
//     * @param id
//     * @return
//     */
//    @DeleteMapping("/{id}")
//    public ResultT delete(@PathVariable Integer id) {
//        applianceapplyService.removeById(id);
//        return ResultT.success();
//    }
//
//    /**
//     * 批量删除表中数据
//     *
//     * @param ids
//     * @return
//     */
//    @PostMapping("/del/batch")
//    public ResultT deleteBatch(@RequestBody List<Integer> ids) {
//        applianceapplyService.removeByIds(ids);
//        return ResultT.success();
//    }
//
//    @PostMapping("queryByEntity")
//    public ResultT queryByEntity(Applianceapply applianceapply) {
//        LambdaQueryWrapper<Applianceapply> lqw = new LambdaQueryWrapper<>();
//        lqw.eq(applianceapply.getId() != null, Applianceapply::getId, applianceapply.getId());
//        lqw.eq(applianceapply.getInstituteId() != null, Applianceapply::getInstituteId, applianceapply.getInstituteId());
//        lqw.eq(applianceapply.getStatus() != null, Applianceapply::getStatus, applianceapply.getStatus());
//        lqw.eq(applianceapply.getPublisherId() != null, Applianceapply::getPublisherId, applianceapply.getPublisherId());
//        lqw.eq(applianceapply.getPubTime() != null, Applianceapply::getPubTime, applianceapply.getPubTime());
//        lqw.eq(applianceapply.getCreateTime() != null, Applianceapply::getCreateTime, applianceapply.getCreateTime());
//        lqw.eq(applianceapply.getStayAtTop() != null, Applianceapply::getStayAtTop, applianceapply.getStayAtTop());
//        lqw.eq(applianceapply.getSortTime() != null, Applianceapply::getSortTime, applianceapply.getSortTime());
//
//        List<Applianceapply> applianceapplyList = applianceapplyService.list(lqw);
//        return ResultT.success(applianceapplyList);
//    }
//}
